<template>
	<view class="card" @click="clickDetail(msgInfo._id)">
		<view class="title">
			{{msgInfo.month| timeFormat('YYYY')}}年{{msgInfo.month| timeFormat('M')}}月
			工资奖金分配上报
		</view>
		<view class="box">
			<image src="@/static/image/supervision/icon4.png" ></image>
			<text class="tag">合计工资</text>
			<text>{{msgInfo.salary | priceFormat(0,'￥',true)}}</text>
		</view>
		<view class="box">
			<image src="@/static/image/supervision/icon3.png" ></image>
			<text class="tag">合计奖金</text>
			<text>{{msgInfo.reward | priceFormat(0,'￥',true)}}</text>
		</view>
		<view class="box">
			<image src="@/static/image/supervision/icon1.png" ></image>
			<text class="tag">上报时间</text>
			<text>{{msgInfo.report_time | timeFormat('YYYY-MM-DD HH:mm')}}</text>
		</view>
		<view class="right">
			<image v-if="msgInfo.state === 'refused'" src="@/static/image/supervision/bhg.png" ></image>
			<image v-else-if="msgInfo.state === 'successed'"  src="@/static/image/supervision/hg.png" ></image>
			<image v-else-if="msgInfo.state === 'wait'"  src="@/static/image/supervision/dsc.png" ></image>
		</view>
	</view>
</template>

<script>
	export default {
		name:"XbdReportCard",
		props: {
			msgInfo: '',
		},
		data() {
			return {
			}
		},
		methods:{
			clickDetail(val){
				uni.navigateTo({
				  url: `/pages/supervision/business/details?type=2&id=${val}`,
				});
				
			},
		}
	}
</script>

<style lang="scss" scoped>
	.card{
		position: relative;
		background-color: #ffffff;
		// justify-content: space-between;
		border-radius: 16rpx;
		margin-top: 20rpx;
		padding: 40rpx 32rpx 20rpx;
		.title{
			font-size: 32rpx;
			font-weight: 700;
			color: #000623;
			margin-bottom: 26rpx;
		}
		.box{
			display: flex;
			align-items: center;
			font-size: 28rpx;
			font-weight: 400;
			text-align: left;
			color: #000623;
			margin-bottom: 20rpx;
			.tag{
				color: #A0A7B8;
				margin: 0 24rpx 0 10rpx;
			}
			image{
				width: 24rpx;
				height: 24rpx;
			}
		}
		.right{
			position: absolute;
			top: 100rpx;
			right: 60rpx;
			image{
				width: 100rpx;
				height: 88rpx;
			}
		}
	}
</style>